﻿namespace Wechat_PublicNumber.Common
{
    public static class Wechat_Url
    {
        public const string BaseUrl = "https://api.weixin.qq.com";

        /// <summary>
        /// 获取AccessToken
        /// </summary>
        public const string AccessToken_Get = $"{BaseUrl}/cgi-bin/token";

        /// <summary>
        /// 推送模板数据给用户
        /// </summary>
        public const string PushTemplate_PublicNumber_Post = $"{BaseUrl}/cgi-bin/message/template/send";

        /// <summary>
        /// 获取用户列表
        /// </summary>
        public const string UserOpenIdList_PublicNumber_Get = $"{BaseUrl}/cgi-bin/user/get";

        /// <summary>
        /// 获取用户信息
        /// </summary>
        public const string UserInfo_PublicNumber_Get = $"{BaseUrl}/cgi-bin/user/info";

        /// <summary>
        /// 批量获取用户信息
        /// </summary>
        public const string UserList_PublicNumber_Post = $"{BaseUrl}/cgi-bin/user/info/batchget";

        /// <summary>
        /// 设置用户备注名
        /// </summary>
        public const string UpdateRemarkToUser_PublicNumber_Post = $"{BaseUrl}/cgi-bin/user/info/updateremark";

        /// <summary>
        /// 创建标签
        /// </summary>
        public const string CreateTag_PublicNumber_Post = $"{BaseUrl}/cgi-bin/tags/create";

        /// <summary>
        /// 获取所有标签
        /// </summary>
        public const string GetTag_PublicNumber_Get = $"{BaseUrl}/cgi-bin/tags/get";

        /// <summary>
        /// 修改标签
        /// </summary>
        public const string UpdateTag_PublicNumber_Post = $"{BaseUrl}/cgi-bin/tags/update";

        /// <summary>
        /// 删除标签
        /// </summary>
        public const string DeleteTag_PublicNumber_Post = $"{BaseUrl}/cgi-bin/tags/delete";

        /// <summary>
        /// 获取标签下粉丝列表
        /// </summary>
        public const string GetUserByTag_PublicNumber_Post = $"{BaseUrl}/cgi-bin/user/tag/get";

        /// <summary>
        /// 批量为用户打标签
        /// </summary>
        public const string TaggingToUser_PublicNumber_Post = $"{BaseUrl}/cgi-bin/tags/members/batchtagging";

        /// <summary>
        /// 批量为用户取消标签
        /// </summary>
        public const string UnTaggingToUser_PublicNumber_Post = $"{BaseUrl}/cgi-bin/tags/members/batchuntagging";

        /// <summary>
        /// 上传临时素材
        /// </summary>
        public const string UploadMedia_Post= $"{BaseUrl}/cgi-bin/media/upload";

        /// <summary>
        /// 客服接口 - 发消息
        /// </summary>
        public const string CustomSend_Post= $"{BaseUrl}/cgi-bin/message/custom/send";

        #region 网页端相关接口
        /// <summary>
        /// 通过code换取网页授权access_token
        /// </summary>
        public const string AccessToken_Web_Get = $"{BaseUrl}/sns/oauth2/access_token";

        /// <summary>
        /// 刷新access_token（如果需要）
        /// </summary>
        public const string RefreshToken_Web_Get = $"{BaseUrl}/sns/oauth2/refresh_token";

        /// <summary>
        /// 拉取用户信息(需scope为 snsapi_userinfo)
        /// </summary>
        public const string GetUserInfo_Web_Get = $"{BaseUrl}/sns/userinfo";

        /// <summary>
        /// 检验授权凭证（access_token）是否有效
        /// </summary>
        public const string CheckAccessToken_Web_Get = $"{BaseUrl}/sns/auth";
        #endregion
    }
}
